package com.yanqu.road.entity.log;

import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Date;

@FieldTypeAnnotation(tableName = "t_l_jieshi_energy", autoSave = true)
public class LogJieShiEnergy {

    @FieldTypeAnnotation(desc = "活动Id", isIndex = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "用户id", isIndex = true)
    private long userId;

    @FieldTypeAnnotation(desc = "类型,1:正常恢复 2:道具恢复 3:消耗")
    private int type;

    @FieldTypeAnnotation(desc = "变更前体力")
    private int beforeEnergy;

    @FieldTypeAnnotation(desc = "变更体力")
    private int offsetEnergy;

    @FieldTypeAnnotation(desc = "变更后体力")
    private int afterEnergy;

    @FieldTypeAnnotation(desc = "时间")
    private Date time;

    public LogJieShiEnergy(int activityId, long userId, int type, int beforeEnergy, int offsetEnergy, int afterEnergy) {
        this.activityId = activityId;
        this.userId = userId;
        this.type = type;
        this.beforeEnergy = beforeEnergy;
        this.offsetEnergy = offsetEnergy;
        this.afterEnergy = afterEnergy;
        this.time = new Date();
    }
}
